import {
	createRouter,
	createWebHistory,
	createWebHashHistory
} from 'vue-router'
import Home from '../pages/Home.vue'
import CalcList from '../pages/calc/CalcList.vue'
import CalcNengXiao from '../pages/calc/NengXiao.vue'
import CalcWenSheng from '../pages/calc/WenSheng.vue'

// createRouter 创建路由实例
const router = createRouter({
	history: createWebHashHistory(), // hash模式：createWebHashHistory，history模式：createWebHistory
	routes: [{
			path: '/',
			component: Home
		},
		{
			name: 'calclist',
			path: '/calclist',
			component: CalcList
		},
		{
			name: 'nengxiao',
			path: '/nengxiao',
			component: CalcNengXiao
		},
		{
			name: 'wensheng',
			path: '/wensheng',
			component: CalcWenSheng
		}
	]
})

// 抛出路由实例, 在 main.js 中引用
export default router
